<!DOCTYPE html>
<head>
<title>MyWebProject</title>
<meta charset="utf-8" />
<!-- <link type="text/css" href="./lib/css/jquery-ui-1.8.19.custom.css"
	rel="stylesheet" />
<link type="text/css" href="./lib/css/ajaxfileupload.css"
	rel="stylesheet" /> -->
<script type="text/javascript" src="js/common/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="js/common/ajaxfileupload.js"></script>
<script type="text/javascript" src="js/common/json2.js"></script>
</head>
<script type="text/javascript">
	function ajaxFileUpload() {
		$.ajaxFileUpload({
			url : "/movie.front/upload/addUser", //submit to UploadFileServlet
			secureuri : false,
			fileElementId :'file',
			dataType : 'json', //or json xml whatever you like~
			success : function(data, status) {
				alert(data.error);
			},
			error : function(data, status, e) {
				alert(e);
			}
		});
		alert("dddddddddddd");
		return false;
	
	}
	
</script>
<body>
	<!-- upload file -->
	<form>
		<table class="tableForm">
			<thead>
				<tr>
					<th>JQuery Ajax File Upload</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td><input id="file" type="file" 
						name="filename"></td>
				</tr>
			</tbody>
			<tfoot>
				<tr>
					<td><button class="button" id="buttonUpload"
							onclick="return ajaxFileUpload();">Upload</button></td>
				</tr>
			</tfoot>
		</table>
		<div id="result" style="margin-left: 200px"></div>
	</form>
</body>

</html>
